/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package pt.mleiria.app.web.bean;

import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;

/**
 *
 * @author manuel
 */
@ManagedBean(name = "newAlertBean")
@SessionScoped
public class NewAlertBean extends AlertsBean {

    
    private String descricao;
    private String hora;
    private String horaFim;
    private boolean activo;
    private boolean voiceAlert;
    
        
    public String saveAlert(){
        getAlertsEjb().saveAlert(getNome(), descricao, getDiaSemana(), hora, horaFim, activo, voiceAlert);
        
        return "";
    }

    public String getDescricao() {
        return descricao;
    }

    public void setDescricao(String descricao) {
        this.descricao = descricao;
    }

    public String getHora() {
        return hora;
    }

    public void setHora(String hora) {
        this.hora = hora;
    }
    public String getHoraFim() {
        return horaFim;
    }

    public void setHoraFim(String horaFim) {
        this.horaFim = horaFim;
    }

    public boolean isActivo() {
        return activo;
    }

    public void setActivo(boolean activo) {
        this.activo = activo;
    }

    public boolean isVoiceAlert() {
        return voiceAlert;
    }

    public void setVoiceAlert(boolean voiceAlert) {
        this.voiceAlert = voiceAlert;
    }
    

}
